home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / dskut / toadshr1.zip / TOADSHAR.DOC < prev    next >
Text File  |  1989-06-14  |  4KB  |  104 lines

  1. Toad Hall Shar v1.1, 14 Jun 89, for Turbo Pascal v5.0
  2.  
  3. TOADSHAR public domain shar/unshar utility
  4.  
  5. Usage:  shar [-u] [file1]..[filen]
  6.  
  7. Where file1..filen can be up to 20 MS-DOS path\filenames
  8. (wildcards permitted).
  9.  
  10. When creating a shar file, TOADSHAR output is to StdOut
  11. (e.g., redirectable to the file or device of your choice).
  12.  
  13. -u    Unshar (extract) members from shar file(s).
  14.     Yes, the -u (case immaterial) MUST be the first command line parameter!
  15.     (And no, slashes won't work!)
  16.     TOADSHAR outputs each shar member to its original name.
  17.     shar filenames can be full DOS paths,
  18.     with a default file type of ".SHR" (added if required).
  19.     Existing files will NOT be overwritten.
  20.  
  21. Comments:
  22.  
  23.   Other shars available for MS-DOS had no wildcard capability;
  24.   had problems with some of the weird (non-MS-DOS) member filenames;
  25.   and I got BLOODY tired of typing in long lines of target filenames
  26.   at the DOS command line when I wanted to shar some files!
  27.  
  28.   TOADSHAR has wildcard capability (both for shar creation and extraction).
  29.  
  30.   I've arbitrarily decided to force the world to accept the MS-DOS shar
  31.   file type of ".SHR" for a shar file type (when wildcard extracting)
  32.   (since we primitive MS-DOS users can't use the standard Unix ".shar"
  33.   filetype).
  34.  
  35.   You don't like it?  Recode it!  (Or quote me an IEEE standard!)
  36.  
  37.  
  38.   During shar creation:
  39.     The .SHR files produced will be simplistic (e.g., none of the fancy
  40.     Unix switches are available).  However, they should be compatible
  41.     with Unix shars (provided you work around the line ending problem,
  42.     of course).
  43.  
  44.     Shar-formatted output is to StdOut (via redirection at the DOS
  45.     command line).  No check is made for an output file's existence
  46.     (naturally).  Output is standard DOS text file (e.g., CR/LF line
  47.     endings).
  48.  
  49.     No tests are made to filter out control characters, etc., and target
  50.     member files are treated as text files.  I would NOT suggest using
  51.     this shar on anything but pure Ascii text files!  GIGO.
  52.  
  53.     Any error msgs will go to StdErr (e.g., console).  (v1.1)
  54.  
  55.  
  56.   During extraction:
  57.  
  58.     You can wildcard the extracting.  (E.g., if you have FOO1.SHR and
  59.     FOO2.SHR, just enter:
  60.  
  61.     TOADSHAR -u FOO*
  62.  
  63.     and both files will be unshared.)
  64.  
  65.     Existing files will NOT be overwritten!  You'll get a warning message,
  66.     and TOADSHAR will continue to chug its way through the remaining shar
  67.     file members (if any) (if it can!).
  68.  
  69.     No tests are made (to date) to replicate sed or sh errorchecking
  70.     (e.g., the simplistic character count).
  71.  
  72.     Some sed/sh "echo" commands are echoed to StdOut during extraction.
  73.  
  74.   I've tested TOADSHAR on Unix and MS-DOS .shar files created with various
  75.   switch settings .. seems to work ok.
  76.  
  77.   This sucker isn't ALL it could be yet .. possible enhancements could
  78.   include:
  79.     - More file read/write error trapping.
  80.     - More sophisticated sh-like testing
  81.       (char counts, tests for file overwriting, etc.)
  82.     - Unix-compatible switches (for LF line terminators
  83.       rather than the MS-DOS CR/LF).
  84.  
  85.    .. but it'll do for now.
  86.  
  87.   Credits:
  88.     Fancy dynamic arrays of FindFirst and FindNext SearchRecs,
  89.     thanks to a (severe) hack of:
  90.  
  91.     "Linked list modules from LINKLIST.PAS"
  92.     Copyright (c) 1985 by Alan D. Hull
  93.  
  94.     Boyer-Moore string searching algorithm/code
  95.     from Dr. Dobbs Journal (full credits in source).
  96.  
  97.     Released to the public domain.
  98.  
  99.     David P Kirschbaum
  100.     Toad Hall
  101.     kirsch@braggvax.ARPA
  102.     (or maybe kirsch%braggvax.ARPA@cacfs.army.mil)
  103.     (919) 868-3471
  104.